<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 在线考试系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
    <div class="container">
        <h1 class="text-center">登录</h1>
        <form action="/" method="POST">
            <div class="form-group">
                <label for="user_type" class="form-label">选择身份:</label>
                <select class="form-control" name="user_type" id="user_type">
                    <option value="teacher">老师</option>
                    <option value="student">学生</option>
                    <option value="parent">家长</option>
                </select>
            </div>
            <div class="form-group">
                <label for="username" class="form-label">用户名:</label>
                <input type="text" id="username" name="username" class="form-control" required>
            </div>
            <div class="form-group">
                <label for="password" class="form-label">密码:</label>
                <input type="password" id="password" name="password" class="form-control" required>
            </div>
            <button type="submit" name="login" class="btn btn-primary w-100">登录</button>
        </form>
        <div class="d-flex justify-content-between mt-3">
            <a href="/register" class="btn btn-link">注册</a>
            <a href="/forgot_password" class="btn btn-link">忘记密码</a>
        </div>
    </div>
</body>
</html>
